package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-07-19
 * Time: 16:50
 */
class MyArray<T>{
    public Object[] array=new Object[10];

    public void set(int pos,T val){
        this.array[pos]=val;
    }
    public T getPos(int pos){
        return (T)this.array[pos];
    }
}
public class Test2 {

    public static void main(String[] args) {
        MyArray<Integer> array=new MyArray();
        array.set(0,1);
        array.set(0,2);
        System.out.println(array);
    }
}
